Set device model when creating rfb console via XenAPI
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 18 Mar 2008 11:06:26 +0000 (11:06 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 18 Mar 2008 11:06:26 +0000 (11:06 +0000)
When creating a rfb console via XenAPI the device model is not being
set to qemu-dm, resulting in no pvfb since qemu-dm is not launched
when domU is started.  This patch sets device model when a rfb console
is created via XenAPI.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
tools/python/xen/xend/XendConfig.py

index ec9c8c5c318557ca5f3c8a805d60c02fbcbf2c4f..f703808da17a529985187a3d287fdf877c321a9a 100644 (file)
@@ -1282,6 +1282,12 @@ class XendConfig(dict):
                     target['devices'][dev_uuid] = ('vfb', dev_info)
                     target['console_refs'].append(dev_uuid)
 
+                    # if console is rfb, set device_model ensuring qemu
+                    # is invoked for pvfb services
+                    if 'device_model' not in target['platform']:
+                        target['platform']['device_model'] = \
+                            xen.util.auxbin.pathTo("qemu-dm")
+
                     # Finally, if we are a pvfb, we need to make a vkbd
                     # as well that is not really exposed to Xen API
                     vkbd_uuid = uuid.createString()